<?php
	if(uploadAction) {
		$uploadAction = 0;
		$timeLimit = 60;
		
		set_time_limit($timeLimit);
		if(($upfile!="none")&&($upfile!="")) {
			$filePath = "F:\eo\\";
			$fileName = $filePath.$upfile_name;
			
			if($upfile_size<1024) {
				$fileSize = (string)$upfile_size."字节";
			} elseif($upfile_size<(1024*1024)) {
				$fileSize = number_format((double)($upfile_size/1024), 1)." KB";
			} else {
				$FileSize = number_format((double)($Upfile_size/(1024*1024)),1)."MB";
			}
			
			if(!file_exists($fileName)) {
				if(copy($upfile, $fileName)) {
					unlink($upfile);
					echo "<br><br>";
					echo "文件 ".$upfile_name." 已经上传成功<br>";
					echo "文件位置: ".$fileName."<br>";
					echo "文件大小: ".$fileSize."<br>";
				} else {
					echo "文件 ".$upfile_name." 已经上传失败<br>";
				} 
			} else {
				echo "文件 ".$upfile_name." 已经存在<br>";
			}
		} else {
			echo "你没有选择任何文件上载<br>";
		}
		set_time_limit(30);
	}
?>
	<form enctype="multipart/form-data" name="submitForm" action="?" method="POST">
		<INPUT TYPE = "hidden" NAME = "MAX_FILE_SIZE" VALUE ="1000000"> 
		<INPUT TYPE = "hidden" NAME = "uploadAction" VALUE = "1">
		<INPUT NAME = "upfile" TYPE = "file" SIZE = "30">
		<br>
		<INPUT NAME = "submit" VALUE = "提交" TYPE = "submit">
		<INPUT NAME = "reset" VALUE = "重置" TYPE = "reset">
	</form>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	